package com.surfilter.bean;

import org.apache.commons.lang.StringUtils;

public abstract class Public {

	private Integer start; // 当前页码
	private Integer limit; // 每页数量
	private String idStr; // ID字符串
	private long[] ids; // ID数组
	private Integer pageNum;//分页

	private int pageIndex;// 前台页面标记(无用)
	private String _;// 参数值(无用)

	public Integer getStart() {
		return start;
	}

	public void setStart(Integer start) {
		this.start = start;
	}

	public Integer getLimit() {
		return limit;
	}

	public void setLimit(Integer limit) {
		this.limit = limit;
	}

	public String getIdStr() {
		return idStr;
	}

	public void setIdStr(String idStr) {
		this.idStr = idStr;
		long[] ids = null;
		if (StringUtils.isNotBlank(idStr)) {
			if (idStr.indexOf(",") != -1) {
				String[] split = idStr.split(",");
				int length = split.length;
				ids = new long[length];
				for (int i = 0; i < length; i++) {
					ids[i] = Long.parseLong(split[i]);
				}
			} else {
				ids = new long[1];
				ids[0] = Long.parseLong(idStr);
			}
		}
		this.ids = ids;
	}

	public long[] getIds() {
		return ids;
	}

	public void setIds(long[] ids) {
		this.ids = ids;
	}

	public int getPageIndex() {
		return pageIndex;
	}

	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}

	public String get_() {
		return _;
	}

	public void set_(String _) {
		this._ = _;
	}

	public Integer getPageNum() {
		return pageNum;
	}

	public void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}
}
